package com.yqtsoft.utils.excel.config;

/**
 * 枚举配置类
 * @author:CrazyShaQiuShi
 * @email: 1047812462@qq.com
 * @createTime: 2018-12-6 9:33
 * @version: 1.0
 */
public enum ElementTypePath {
    /**
     * java.util.Set
     */
    SET("java.util.Set"),
    /**
     * java.util.Map
     */
    MAP("java.util.Map"),
    /**
     * java.util.List
     */
    LIST("java.util.List");

    private String path;

    ElementTypePath(String path) {
        this.path = path;
    }

    /**
     * 获取元素
     *
     * @param path
     * @return ElementTypePath 返回类型
     * @throws
     */
    public static ElementTypePath getElementTypePath(String path) {
        for (ElementTypePath elementTypePath : ElementTypePath.values()) {
            if (elementTypePath.path.equals(path)) {
                return elementTypePath;
            }
        }
        return null;
    }

    @SuppressWarnings("static-access")
    @Override
    public String toString() {
        return ElementTypePath.valueOf(path).getPath();
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }


}
